<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
    <meta content=always name=referrer>
    <link rel="stylesheet" type="text/css" href="__STATIC__/css/newbase.css">
    <script src="__STATIC__/js/jquery-1.8.2.js"></script>
    <title>订单详情</title>
    <script>
        $(function () {
            $(".chose").toggle(
                    function () {
                        $(this).attr("src","__STATIC__/img/1234.png")
                    },
                    function () {
                        $(this).attr("src","__STATIC__/img/123.png")
                    }
            )
        })
    </script>
</head>
<body>
<div class="wrap-ord-det">
    <div class="header">
        <p>订单详情</p>
        <img src="__STATIC__/img/back.png" class="back" onclick="history.go(-1)">
        <span><a href="javascript:void(0);">{$data.status_text}</a></span>
    </div>
    <div class="menu">
        <div class="address">
            <p>订单编号：{$data.shop_order_number}</p>
            <p>付款时间：{$data.create_time} </p>
        </div>
        {if condition="input('status') eq 2"}
        <div>
            <a href="javascript:see_express({:input('order_id')});"><img src="__STATIC__/img_user/wd-fenxiao.png">
            <span> 物流信息</span>
            <img src="__STATIC__/img_user/next2.png">
            </a>
        </div>
        {/if}
    </div>
    <div class="center">
        <div class="address">
            <span>收货人</span>
            <p>{$data.address_name}    {$data.address_phone}</p>
            <p>{$data.address_site}</p>
        </div>
    </div>
    <div class="main">
        <h4><a href="javascript:jump_shop({$data.shop_id});"><span>店铺名称:{$data.shop.title}  </span><img src="__STATIC__/img_user/next2.png"></a></h4>
        {volist name='data.memberOrderAttached' id='v'}
        <div class="content">
            <div class="left">
                <img src="/{$v.thumb_img}">
            </div>
            <div class="right">
                <div class="title">
                    <p>{$v.title}</p>
                </div>
                <p class="type">属性规格：{$v.attr}<span>×{$v.number}</span></p>
                <div class="price">
                    <div>&yen;{$v.price}</div>
                </div>
            </div>
        </div>
        {/volist}
    </div>
    <ul class="list">
        <li class="fare">
            <span>运费：</span><p><a href="javascript:void(0);"><span>&yen;{$data.freight} </span></a></p>
        </li>
        <li class="fare">
            <span>优惠券：</span><p><a href="javascript:void(0);"><span>- &yen;{$data.coupon_price} </span></a></p>
        </li>
        <li class="fare">
            <span>积分抵扣：</span><p><a href="javascript:void(0);"><span>- &yen;{$data.red_packet_price} </span></a></p>
        </li>
        <li class="fare">
            <span>实付款 ：</span><p><a href="javascript:void(0);"><span class="price">&yen;{$data.price} </span></a></p>
        </li>
    </ul>

</div>
<script src="__STATIC__/js/layer_mobile/layer.js"></script>
<script>
    //跳转到店铺
    function jump_shop(id) {
        var url = "{:url('mobile/user_category/shop_index')}?shop_id="+id;
        sessionStorage.setItem('url_back',window.location.href);
        window.location.href = url;
    }
    //查看物流
    function see_express(id){
        $.ajax({
            url : "{:url('mobile/member_order/refund_details')}?order_id="+id,
            dataType:'json',
            type:'post',
            success:function (data) {
                if (data.code == 400){
                    layer.open({content:data.message,skin:'msg',time:2})
                }else{
                    window.location.href = "{:url('mobile/member_order/refund_details')}?status={:input('status')}&order_id="+id+"&title={:input('title')}";
                }
            },
            error: function () {
                layer.open({content:'网络繁忙,请重试',skin:'msg',time:2});
            }
        })
    }
</script>
</body>
</html>